<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录/注册</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- For-Mobile-Apps-and-Meta-Tags -->
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- //For-Mobile-Apps-and-Meta-Tags -->

    <link href="css/style.css" type="text/css" rel="stylesheet" media="all">
    <link href="css/jquerysctipttop.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1>Sliding Forms Widget</h1>
<section>
    <div class="controls w3l">
        <div class="cbcontrol" id="cbControlRight"><</div>
        <div class="cbcontrol" id="cbControlLeft">></div>
        <div class="clear"></div>
    </div>
    <div class="stage">

        <div class="cbImage w3">
            <h3>注册</h3>
            <form action="add.html?act=add" method="post">
                <input type="text" class="name" name="name" placeholder="用户名" required="">
                <input type="password" class="password" name="password" placeholder="密码" required="">
                <input type="password" class="pword" name="pword" placeholder="确认密码" required="">
                <input type="text" class="email" name="email" placeholder="Email" required="">
                <input type="button" class="done" id="myform" value="注册">
            </form>
        </div>
        <div class="cbImage active signin agileits">
            <h3>登录</h3>
            <form action="get.html" method="post">
                <input type="text" name="name" class="name" placeholder="用户名" required="">
                <input type="password" name="password" class="password" placeholder="密码" required=""><br>
                <input type="submit" value="登录">${error}
                <ul>
                    <li><a href="#" class="forgot">忘记密码?</a></li>
                </ul>
            </form>
        </div>
        <div class="cbImage agileinfo">
            <h3>注意事项</h3>
            <form action="#" method="post">
                <div>注意事项</div>
                <div>注意事项1</div>
                <div>注意事项2</div>
            </form>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
    <div class="footer">
        <p>&copy; 2016 Sliding Forms Widget. All Rights Reserved | Design by sucaihuo.com</p>
    </div>
</section>
<script src="js/jquery-2.1.4.min.js"></script>
<script src="coverflow-slideshow.js"></script>
</body>

<script>

    $("#myform").click(function () {
        var password=$("input[name='password']").val();
        var pword=$("input[name='pword']").val();
        var name=$("input[name='name']").val();
        if(password==null||password.trim().length==0){
            alert("请输入密码");
            return false;
        }
        if(pword==null||newPwd1.trim().length==0){
            alert("请确认密码");
            return false;
        }
        if(name==null||newPwd2.trim().length==0){
            alert("请输入用户名");
            return false;
        }
        if(password!=pword){
            alert("俩次密码不一致");
            return false;
        }
        var regx=/[0-9]{6}/g;
        if(!regx.test(password)){
            alert("密码必须为6位数字");
            return false;
        }
        return true;
    })
</script>
</html>
